package demo1;

public class Dog extends Animal{

    public String color;

    static{
        System.out.println("Dog的静态代码块...");
    }

    {
        System.out.println("Dog的实例代码块...");
    }

    public Dog(){
        super();
        System.out.println("子类不带参数的构造方法执行完成...");
    }


    public Dog(String name, int age, String color){
        super(name, age);
        // this();
        this.color = color;
        System.out.println("子类带三个参数的构造方法执行完成...");
    }

    public void bark(){
        System.out.println(this.name + "正在旺旺叫...");
    }

    /*public static void test(){
        super();
        this();
    }*/

}
